import logo from './logo.svg';
import { Component } from 'react'
import './App.css';
import Child1 from './components/Child1'
import Child2 from './components/Child2'

class App extends Component {
  constructor() {
    super()
    this.state = {
      title: '1234'
    }
  }
  setData = () => {
    this.setState({
      title:'2345677'
    })
  }
  render() {
    return (
      <div className="App">
        <Child1 title={this.state.title}></Child1>
        <Child2></Child2>
        <button onClick={
          this.setData
        }>点击</button>
      </div>
    )
  }
}
export default App;
